﻿<%@ Page Language="C#" MasterPageFile="~/ClinicalForms/ClinicalHeaderFooter.master"
    AutoEventWireup="true" CodeFile="frmClinical_CustomForm.aspx.cs" Inherits="frmClinical_CustomForm"
    Title="Untitled Page" MaintainScrollPositionOnPostback="true" EnableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="clinicalheaderfooter" runat="Server">
    <link type="text/css" href="../Style/_assets/css/grid.css" rel="stylesheet" />
    
    <form id="frmClinical_CustomFrm" method="post" runat="server">
    <script language="javascript" type="text/javascript">
            
                function WindowPrint() {
                    window.print();
                }

                function OpenPharmacyDialog(DrgId) {
                    window.open('../Pharmacy/frmDrugSelector.aspx?DrugType=' + DrgId + '&BtnDrg=customfrmDrug', 'DrugSelection', 'toolbars=no,location=no,directories=no,dependent=yes,top=10,left=30,maximize=no,resize=no,width=700,height=350,scrollbars=yes');
                }

                function OpenRegimenDialog(DrgId, ControlId) {
                    window.open('../Pharmacy/frmDrugSelector.aspx?RegType=' + DrgId + '&BtnRegimen=customfrmReg&Cntrl=' + ControlId + '', 'DrugSelection', 'toolbars=no,location=no,directories=no,dependent=yes,top=10,left=30,maximize=no,resize=no,width=700,height=350,scrollbars=yes');
                }
                function AdditionalLab() {
                    window.open('../Laboratory/frmLabSelector.aspx?Mode=All', 'LabSelection', 'toolbars=no,location=no,directories=no,dependent=yes,top=10,left=30,maximize=no,resize=no,width=700,height=350,scrollbars=yes');
                }
                function ICD10PopUp(FieldId, VisitId) {
                    window.open('frmClinicalICD10Selector.aspx?Param=' + FieldId +' &Param1='+VisitId+'', 'ICD10Selection', 'toolbars=no,location=no,directories=no,dependent=yes,top=30,left=70,maximize=no,resize=no,width=950,height=470,scrollbars=yes');
                }
                function GetControl() {
                    document.forms(0).submit();
                }
                function SetValue(theObject, theValue)
                {
                    document.getElementById('ctl00_clinicalheaderfooter_'+theObject).value= theValue;  
                    document.forms(0).submit(); 
                }
                
    function SendCodeName(str)
    {
        var id	= document.getElementById(str).value;
        if (id.length<=0)
		{
    		return false;
		}
		else
		{
			CallServer(id,"This is context from client");
			return true;
		}
    }
     function ReceiveServerData(args, context)
     {
        //confirm(args);
        
         if((!(args =='')) && (window.ActiveXObject))
         {
            var obj = new ActiveXObject("MSXML2.DOMDocument");
            obj.loadXML(args);
            try
            {
            var dsRoot=obj.documentElement;
            for (var i=0; i < dsRoot.childNodes.length; i++)
            {
             var ID = dsRoot.childNodes(i).childNodes(0).firstChild.text;
             var Value = dsRoot.childNodes(i).childNodes(1).firstChild.text;
             var type = dsRoot.childNodes(i).childNodes(2).firstChild.text;
             if ((Value==0) && (type !='DropDown'))
             {
             document.getElementById('ctl00_clinicalheaderfooter_'+ID).value= '';
             }
             else
             {
             document.getElementById('ctl00_clinicalheaderfooter_'+ID).value= Value; 
             }   
            
            }
            }
            catch(err)
             {
             }
         }
        
     }
      
     function CallMe(src)
     {     
     var ctrl = document.getElementById(src).value;
     // call server side method
     //alert(ctrl);
 }
    function OpenTreeViewPopup(param1,param2) {
        var val1 = document.getElementById('ctl00$clinicalheaderfooter$' + param1).value;
        var val = param1 + '%' + param2;
        window.open('frmClinicalTreeviewICDCode.aspx?param=' + val + '&ParamValue='+val1+'', '', 'toolbars=no,location=no,directories=no,dependent=yes,top=300,left=400,maximize=no,resize=no,width=600,height=500,scrollbars=yes');
       }
    </script>

    <div id="DIVCustomForm" runat="server">
        <h1 class="margin" id="Header" runat="server" visible="false">
        </h1>
        <div id="DivVisitDate" class="border center formbg"  runat="server">
            <table id="tbl1" cellspacing="6" cellpadding="0" width="100%" border="0" runat="server">
                <tbody>
                    <tr>
                        <td class="form" align="center" valign="top" colspan="2">
                            <label class="required" for="VisitDate" id="lblvisitdate">
                                Visit Date:</label>
                            <asp:TextBox ID="txtvisitDate" MaxLength="11" runat="server" Width="8%"></asp:TextBox>
                            <img onclick="w_displayDatePicker('<%= txtvisitDate.ClientID %>');" height="22" alt="Date Helper"
                                hspace="3" src="../images/cal_icon.gif" width="22" border="0">
                            <span class="smallerlabel">(DD-MMM-YYYY)</span>
                            
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <br />
        <asp:Panel class="border center formbg" ID="DIVCustomItem" runat="server">
        
            <br />
        </asp:Panel>
        <br />
        <div class="border center formbg">
            <table cellspacing="6" cellpadding="0" width="100%">
                <tbody>
                    <tr>
                        <td class="form" align="center" valign="top" colspan="2">
                            <label for="VisitDate">
                                Signature:</label>
                            <asp:DropDownList ID="ddSignature" runat="server">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <asp:TextBox ID="txtSysDate" runat="server" CssClass="textstylehidden"></asp:TextBox>
                        <td align="center">
                            <asp:HiddenField ID="hdfldDOB" runat="server" />
                            <asp:HiddenField ID="theHitCntrl" runat="server" />
                            <asp:Button ID="btnsave" Text="Save" runat="server" OnClick="btnsave_Click" />
                            <asp:Button ID="btncomplete" runat="server" Text="Data Quality Check" Visible="false"
                                OnClick="btncomplete_Click" />
                            <asp:Button ID="btnCancel" Text="Close" runat="server" OnClick="btnCancel_Click">
                            </asp:Button>
                            <asp:Button ID="btnPrint" Text="Print" runat="server" runat="server" OnClientClick="WindowPrint()" />
                        </td>
                    </tr>
                   <%-- <asp:HiddenField ID="hidautoSingleLineID" runat="server" />
                    <asp:HiddenField ID="hidautoDecimalID" runat="server" />
                    <asp:HiddenField ID="hidautoNumericID" runat="server" />
                    <asp:HiddenField ID="hidautoDropdownID" runat="server" />
                    <asp:HiddenField ID="hidautoDateID" runat="server" />
                    <asp:HiddenField ID="hidautoMultiLineID" runat="server" />
                    <asp:HiddenField ID="hidautoSingleLineValue" runat="server" />
                    <asp:HiddenField ID="hidautoDecimalValue" runat="server" />
                    <asp:HiddenField ID="hidautoNumericValue" runat="server" />
                    <asp:HiddenField ID="hidautoDropdownValue" runat="server" />
                    <asp:HiddenField ID="hidautoDateValue" runat="server" />
                    <asp:HiddenField ID="hidautoMultiLineValue" runat="server" />--%>
                </tbody>
            </table>
        </div>
    </div>
    </form>
</asp:Content>
